#include <stdio.h>

int main()
{
	int num = 100;
	int ge = 0;
	int shi = 0;
	int bai = 0;
	while(num < 1000)
	{
		ge = num % 10;
		shi = num / 10 % 10;
		bai = num / 100;
		if(num == ge*ge*ge + shi*shi*shi + bai*bai*bai)
		{
			printf("%d ", num);
		}
		num++;
	}

	return 0;
}
